unit fQuotedObject;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs,          
         
         
       
         
      Menus, cxLookAndFeelPainters, StdCtrls,
  cxButtons, cxEdit, cxLabel, cxControls, cxContainer, cxCheckListBox;

type
  TfmQuotedObject = class(TForm)
    clbObjects: TcxCheckListBox;
    cxLabel1: TcxLabel;
    btnCancel: TcxButton;
    btnOk: TcxButton;
    procedure btnOkClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    strQuotedObjects: string;
  end;

var
  fmQuotedObject: TfmQuotedObject;

implementation

uses
  fClientDataModule, tools;

{$R *.dfm}

procedure TfmQuotedObject.btnOkClick(Sender: TObject);
var
  i: Integer;
begin
  for i := 0 to clbObjects.Count - 1 do
  begin
    if clbObjects.Items[i].Checked then
      strQuotedObjects := strQuotedObjects + clbObjects.Items[i].Text+ ' ';
  end;
  ModalResult := mrOk;
  
  
end;

procedure TfmQuotedObject.FormCreate(Sender: TObject);
begin
  strQuotedObjects := '';
  OpenPublicQuery('select bcqo_name from b_c_quotedobject');
  with ClientDataModule do
  begin
    tblDynamic.First;
    while not tblDynamic.EOF do
    begin
      clbObjects.AddItem(tblDynamic.Fields[0].AsString);
      tblDynamic.Next;
    end;
  end;
end;

end.
